
<?php defined('SEJUJOPEFDNGJSL') or exit('Access denied'); ?>
<?php
if(!isset($_GET['templist'])){
	$now_price=getprice();
    $records=qianbao_list($_userid,'pbc');
?>
    <?php require("topbut.php") ?>
    <div class="panel panel-inverse">
        <div class="panel-heading">
            <div class="row">
                <div class="col-md-12">
                    <h4 class="panel-title" style="float: left;">提现VIC</h4>
                    <a href="<?php echo $GLOBALARR['curl']?>&templist=3" style="color: #fff;float: right;padding-left: 15px;">提现BTC</a>&nbsp;&nbsp;&nbsp;
                    <a href="<?php echo $GLOBALARR['curl']?>&templist=4" style="color: #fff;float: right;padding-left: 15px;">提现LTC</a>&nbsp;&nbsp;&nbsp;
                    <a href="<?php echo $GLOBALARR['curl']?>&templist=1" style="color: #fff;float: right;">查看提现记录</a>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <form action="control.php" method="post"  class="form-horizontal">
                <div class="table-responsive">

                    </div>
                <input type="hidden" name="act" value="zhuancoin" />
                <input type="hidden" name="coin" id="coin" value="vic" />
                <input type="hidden" name="sprice" value="<?php echo $now_price; ?>" />
                <fieldset style="border:none;">
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">VIC提现类型</label>
                        <div class="col-md-9 ui-sortable">
                            <select class="form-control" name="ztype" id="ztype" onchange="xuanze()">
                                <option value="-1">请选择提现类型</option>
                                <option value="1">锁仓收益</option>
                                <option value="2">团队收益</option>

                                <option value="0" style="color:red">VIC</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group" id="lixi" style="display:none">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">VIC最大可提</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="num" id="num" value="<?php echo $r['lixi_crash']?>" class="form-control" readonly="readonly" />
                        </div>
                    </div>
                    <div class="form-group" id="tuandui" style="display:none">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">VIC最大可提</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="num" id="num" value="<?php echo $r['keyong_ldprize']?>" class="form-control" readonly="readonly" />
                        </div>
                    </div>
                    <div class="form-group" id="benjin" style="display:none">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">VIC最大可提</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="num" id="num" value="<?php echo $r['cash_purse']?>" class="form-control" readonly="readonly" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable"> VIC提现数量</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="num" id="num" value="" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">提现钱包地址</label>
                        <div class="col-md-9 ui-sortable">
                            <!--<input type="text" name="bgy_address" id="bgy_address"  value="" class="form-control" />-->
                            <select class="form-control" name="bgy_address" id="bgy_address" >
                                <option value="-1">请选择钱包地址</option>
                            <? foreach ($records['arr'] as $k => $v) {?>
                                <option value="<?=$v['addr']?>"><?=$v['name']?>:<?=$v['addr']?></option>
                            <? }?>
                            <option value="tianjia" style="color:#e76500">添加钱包地址</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">手机短信验证</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="mobile" id="mobile" value="<?php echo $r['phone']?>" class="form-control" readonly="readonly" />
                            <span style="color:red;" id="ztxt"></span>
                            <span style="display:none;" id="did"></span>
                        </div>
                    </div>
                    <div class="form-group">
                      <label class="col-md-3 control-label ui-sortable">验证码</label>
                      <div class="col-md-7 ui-sortable">
                        <input type="text" class="input-text yzmput form-control" name="coded" id="coded" />
                        <p  style="color: red;">提现须知：提现手续费为10%，提现过程需要3个以上网络确认。</p>
                      </div>
                      <div class="col-md-2 ui-sortable">
                        <input type="button" id="btnSendCode" onclick="sendSms()" class="btn btn-md btn-danger" value="发送验证码">
                      </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4 col-md-offset-3 ui-sortable">
                            <button type="submit" class="btn btn-md btn-success m-r-5">提交</button>
                        </div>
                    </div>
                </fieldset>
			</form>
		</div>
	</div>
    <script type="text/javascript" src="/public/home/js/layer/layer.js"></script>
	<script type="text/javascript">
    var InterValObj; //timer变量，控制时间
    var count = 60; //间隔函数，1秒执行
    var curCount;//当前剩余秒数
    function xuanze(){
        var ztype = $("#ztype").val();
        if(ztype==-1){
            $("#lixi").hide();
            $("#benjin").hide();
            $("#tuandui").hide();
        }
        if(ztype==0){
            $("#lixi").hide();
            $("#benjin").show();
            $("#tuandui").hide();
        }
        if(ztype==1){
            $("#lixi").show();
            $("#benjin").hide();
            $("#tuandui").hide();
        }
        if(ztype==2){
            $("#lixi").hide();
            $("#benjin").hide();
            $("#tuandui").show();
        }
    }
    function sendSms(){
        $.ajaxSetup({
            async: false
        });
        var phone = $("#mobile").val();

         //两者格式都争取情况下可发送手机验证码
         curCount = count;
    　　//设置button效果，开始计时
         $("#btnSendCode").attr("disabled", "true");
         $("#btnSendCode").val("请在" + curCount + "秒内输入验证码");
         InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器，1秒执行一次

         $.ajax({
            type: "get",
            dataType: "json",
            url: "/plus/sendsms.php?phone="+phone,
            success: function(data){
                layer.alert(data.res);
            },
            error: function(){

            },
            cache: false,
            async: false
         });
    }
    //timer处理函数
    function SetRemainTime() {
        if(curCount == 0){
          window.clearInterval(InterValObj);//停止计时器
          $("#btnSendCode").removeAttr("disabled");//启用按钮
          $("#btnSendCode").val("重新发送验证码");
        }else{
           curCount--;
           $("#btnSendCode").val("请在" + curCount + "秒内输入验证码");
        }
    }
    $('#num').css("ime-mode","disabled").bind('keyup change',function(){
  var amount = $('#num').val();
  if(amount.indexOf(".") != "-1"){
    var barr = amount.split(".");
    var xiaoshu = barr[1].length;
    if(xiaoshu>4){
      var org = barr[1].substr(0,xiaoshu-1);
      var xin = parseFloat(barr[0]+"."+org);
      $("#num").val(xin);
    }
  }


});
    $("#bgy_address").change(function () {

        var type = $("#bgy_address option:selected").val();
        if (type == 'tianjia') {
            window.location = '/home.php?lsact=qianbao';
        }
    });
    </script>
<?php
}
elseif($_GET['templist']==1){
	$qbtype=array(0=>'VIC',1=>'锁仓收益',2=>'团队收益',3=>' 岗位积分',15=>'BTC',16=>'LTC');
?>
<?php require("topbut.php") ?>
    <div class="panel panel-inverse">
        <div class="panel-heading">
            <div class="row">
                <div class="col-md-12">
                    <h4 class="panel-title" style="float: left;">我的提现记录</h4>
                    <a href="home.php?lsact=zhuancoin" style="color:#fff;float: right;">返回</a>
                </div>
            </div>
        </div>
        <div class="panel-body">
			<div class="table-responsive">
				<table class="table table-striped givetable">
				  <tbody>
					<tr>
						<th>序号</th>
                        <th>币种</th>
						<th>提现类型</th>
						<th>提现数量</th>
						<!--<th>兑换单价</th>
						<th>总金额</th>-->
						<th>手续费</th>
                        <th>实际到账个数</th>
						<th>提现时间</th>
						<th>钱包地址</th>
                        <th>提现状态</th>
					</tr>
	<?php
	$records=duihuan_record(0,$_userid,'','','zhuancoin');
    // var_dump($records);exit;
	$ii=0;
	foreach ($records['arr'] as $k => $v) {
	  $ii++;
	?>
		<tr>
			<td align="center"><?php echo $ii;?></td>
            <td align="center"><?php echo strtoupper($v['coin']);?></td>
			<td align="center"><?php echo $qbtype[$v['ctype']];?></td>
			<td align="center"><?php if($v['coin']=='vic'){echo sprintf("%.4f",$v['num']);}else{echo $v['num'];}?></td>
			<!--<td align="center"><?php echo $v['cprice'];?></td>
			<td align="center"><?php if($v['coin']=='vic'){echo sprintf("%.4f",$v['ctotal']);}else{echo $v['ctotal'];}?></td>-->
			<td align="center"><?php echo $v['cfee'];?></td>
            <td align="center"><?php if($v['coin']=='vic'){echo sprintf("%.4f",$v['sjnum']);}else{echo $v['sjnum'];}?></td>
			<td align="center"><?php echo formatdate($v['ctime'])?></td>
			<td align="center"><?php echo $v['caddress'];?></td>
            <td>
            <?php
            if($v['is_cross']==0){
                echo "<font color='red'>未审核</font>";
            }elseif($v['is_cross']==1){
                echo "<font color='green'>已审核</font>";
            }else{
                echo "未通过";
            }
            ?>
            </td>
		</tr>
	<?php
	}
	?>
				  </tbody>
                </table>
            </div>
        </div>
	</div>
	<?php if(($records['pcount']/$records['pagecount'])>1){ ?>
		<div class="pagediv"><?php echo $records['pagearr'][0]?></div>
	<?php } ?>
	<?php if($records['pcount']==0){ ?>
		<div class="pagediv" style="text-align:center;color:#E47501">--> 暂无数据</div>
	<?php } ?>
<?php
}
elseif($_GET['templist']==2){
    $qbtype=array(0=>'vic',1=>'锁仓收益',2=>'团队收益',3=>' 岗位积分',15=>'BTC',16=>'LTC');
?>
<?php require("topbut.php") ?>

    <div class="panel panel-inverse">
        <div class="panel-heading">
            <div class="row">
                <div class="col-md-12">
                    <h4 class="panel-title" style="float: left;">充值记录</h4>
                    <a href="home.php?lsact=zhuancoin&templist=5" style="color:#fff;float: right;">资产充值</a>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <div class="table-responsive">
                <table class="table table-striped givetable">
                  <tbody>
                    <tr>
                        <th>序号</th>
                        <th>币种</th>
                        <!--<th>充值类型</th>-->
                        <th>充值数量</th>
                        <!--<th>充值单价</th>
                        <th>总金额</th>-->
                        <th>充值时间</th>
                        <!--<th>钱包地址</th>-->
                        <th>txid</th>
                        <th>状态</th>
                    </tr>
    <?php
    $records=duihuan_record(1,$_userid,'','','zhuancoin');
    $ii=0;
    foreach ($records['arr'] as $k => $v) {
      $ii++;
    ?>
        <tr>
            <td align="center"><?php echo $ii;?></td>
            <td align="center"><?php echo $v['coin'];?></td>
            <!--<td align="center"><?php echo $qbtype[$v['ctype']];?></td>-->
            <td align="center"><?php echo $v['num'];?></td>
            <!--<td align="center"><?php echo $v['cprice'];?></td>
            <td align="center"><?php echo $v['ctotal'];?></td>-->
            <td align="center"><?php echo formatdate($v['ctime'])?></td>
            <!--<td align="center"><?php echo $v['caddress'];?></td>-->
            <td align="center"><?php echo $v['txid'];?></td>
            <td align="center">成功</td>
        </tr>
    <?php
    }
    ?>
                  </tbody>
                </table>
            </div>
        </div>
    </div>
    <?php if(($records['pcount']/$records['pagecount'])>1){ ?>
        <div class="pagediv"><?php echo $records['pagearr'][0]?></div>
    <?php } ?>
    <?php if($records['pcount']==0){ ?>
        <div class="pagediv" style="text-align:center;color:#E47501">--> 暂无数据</div>
    <?php } ?>
<?php
}
elseif($_GET['templist']==3){
    $now_price=getprice();
    $records=qianbao_list($_userid,'btc');
?>
    <?php require("topbut.php") ?>
    <div class="panel panel-inverse">
        <div class="panel-heading">
            <div class="row">
                <div class="col-md-12">
                    <h4 class="panel-title" style="float: left;">提现BTC</h4>
                    <a href="<?php echo $GLOBALARR['curl']?>" style="color: #fff;float: right;padding-left: 15px;">提现VIC</a>
                    <a href="<?php echo $GLOBALARR['curl']?>&templist=4" style="color: #fff;float: right;padding-left: 15px;">提现LTC</a>&nbsp;&nbsp;&nbsp;
                    <a href="<?php echo $GLOBALARR['curl']?>&templist=1" style="color: #fff;float: right;">查看提现记录</a>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <form action="control.php" method="post"  class="form-horizontal">
                <div class="table-responsive">

                    </div>
                <input type="hidden" name="act" value="zhuancoin" />
                <input type="hidden" name="coin" id="coin" value="btc" />
                <input type="hidden" name="sprice" value="<?php echo $now_price; ?>" />
                <fieldset style="border:none;">



                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">BTC账户余额</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="LTC" id="LTC" value="<?php echo sprintf("%.6f",$r['btc_account'])?>" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">BTC提现数量</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="num" id="num" value="" class="form-control" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">手机短信验证</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="mobile" id="mobile" value="<?php echo $r['phone']?>" class="form-control" readonly="readonly" />
                            <span style="color:red;" id="ztxt"></span>
                            <span style="display:none;" id="did"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">提现钱包地址</label>
                        <div class="col-md-9 ui-sortable">
                            <select class="form-control" name="bgy_address" id="bgy_address" >
                                <option value="-1">请选择钱包地址</option>
                            <? foreach ($records['arr'] as $k => $v) {?>
                                <option value="<?=$v['addr']?>"><?=$v['name']?>:<?=$v['addr']?></option>
                            <? }?>
                            <option value="tianjia" style="color:#e76500">添加钱包地址</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                      <label class="col-md-3 control-label ui-sortable">验证码</label>
                      <div class="col-md-7 ui-sortable">
                        <input type="text" class="input-text yzmput form-control" name="coded" id="coded" />
                        <p  style="color: red;">提现须知：提现手续费为10%，提现过程需要3个以上网络确认。</p>
                      </div>
                      <div class="col-md-2 ui-sortable">
                        <input type="button" id="btnSendCode" onclick="sendSms()" class="btn btn-md btn-danger" value="发送验证码">
                      </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4 col-md-offset-3 ui-sortable">
                            <button type="submit" class="btn btn-md btn-success m-r-5">提交</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
    <script type="text/javascript" src="/public/home/js/layer/layer.js"></script>
    <script type="text/javascript">
    var InterValObj; //timer变量，控制时间
    var count = 60; //间隔函数，1秒执行
    var curCount;//当前剩余秒数
    function sendSms(){
        $.ajaxSetup({
            async: false
        });
        var phone = $("#mobile").val();

         //两者格式都争取情况下可发送手机验证码
         curCount = count;
    　　//设置button效果，开始计时
         $("#btnSendCode").attr("disabled", "true");
         $("#btnSendCode").val("请在" + curCount + "秒内输入验证码");
         InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器，1秒执行一次

         $.ajax({
            type: "get",
            dataType: "json",
            url: "/plus/sendsms.php?phone="+phone,
            success: function(data){
                layer.alert(data.res);
            },
            error: function(){

            },
            cache: false,
            async: false
         });
    }
    //timer处理函数
    function SetRemainTime() {
        if(curCount == 0){
          window.clearInterval(InterValObj);//停止计时器
          $("#btnSendCode").removeAttr("disabled");//启用按钮
          $("#btnSendCode").val("重新发送验证码");
        }else{
           curCount--;
           $("#btnSendCode").val("请在" + curCount + "秒内输入验证码");
        }
    }
$('#num').css("ime-mode","disabled").bind('keyup change',function(){
  var amount = $('#num').val();
  if(amount.indexOf(".") != "-1"){
    var barr = amount.split(".");
    var xiaoshu = barr[1].length;
    if(xiaoshu>6){
      var org = barr[1].substr(0,xiaoshu-1);
      var xin = parseFloat(barr[0]+"."+org);
      $("#num").val(xin);
    }
  }


});
    $("#bgy_address").change(function () {

        var type = $("#bgy_address option:selected").val();
        if (type == 'tianjia') {
            window.location = '/home.php?lsact=qianbao';
        }
    });
    </script>
<?
}
elseif($_GET['templist']==4){
    $now_price=getprice();
    $records=qianbao_list($_userid,'ltc');
?>
    <?php require("topbut.php") ?>
    <div class="panel panel-inverse">
        <div class="panel-heading">
            <div class="row">
                <div class="col-md-12">
                    <h4 class="panel-title" style="float: left;">提现LTC</h4>
                    <a href="<?php echo $GLOBALARR['curl']?>" style="color: #fff;float: right;padding-left: 15px;">提现VIC</a>&nbsp;&nbsp;&nbsp;
                    <a href="<?php echo $GLOBALARR['curl']?>&templist=3" style="color: #fff;float: right;padding-left: 15px;">提现BTC</a>&nbsp;&nbsp;&nbsp;
                    <a href="<?php echo $GLOBALARR['curl']?>&templist=1" style="color: #fff;float: right;">查看提现记录</a>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <form action="control.php" method="post"  class="form-horizontal">
                <input type="hidden" name="act" value="zhuancoin" />
                <input type="hidden" name="coin" id="coin" value="ltc" />
                <input type="hidden" name="sprice" value="<?php echo $now_price; ?>" />
                <fieldset style="border:none;">



                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">LTC账户余额</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="LTC" id="LTC" value="<?php echo  sprintf("%.6f",$r['ltc_account'])?>" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">LTC提现数量</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="num" id="num" value="" class="form-control" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">手机短信验证</label>
                        <div class="col-md-9 ui-sortable">
                            <input type="text" name="mobile" id="mobile" value="<?php echo $r['phone']?>" class="form-control" readonly="readonly" />
                            <span style="color:red;" id="ztxt"></span>
                            <span style="display:none;" id="did"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">提现钱包地址</label>
                        <div class="col-md-9 ui-sortable">
                            <select class="form-control" name="bgy_address" id="bgy_address" >
                                <option value="-1">请选择钱包地址</option>
                            <? foreach ($records['arr'] as $k => $v) {?>
                                <option value="<?=$v['addr']?>"><?=$v['name']?>:<?=$v['addr']?></option>
                            <? }?>
                            <option value="tianjia" style="color:#e76500">添加钱包地址</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                      <label class="col-md-3 control-label ui-sortable">验证码</label>
                      <div class="col-md-7 ui-sortable">
                        <input type="text" class="input-text yzmput form-control" name="coded" id="coded" />
                        <p  style="color: red;">提现须知：提现手续费为10%，提现过程需要3个以上网络确认。</p>
                      </div>
                      <div class="col-md-2 ui-sortable">
                        <input type="button" id="btnSendCode" onclick="sendSms()" class="btn btn-md btn-danger" value="发送验证码">
                      </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-4 col-md-offset-3 ui-sortable">
                            <button type="submit" class="btn btn-md btn-success m-r-5">提交</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
    <script type="text/javascript" src="/public/home/js/layer/layer.js"></script>
    <script type="text/javascript">
    var InterValObj; //timer变量，控制时间
    var count = 60; //间隔函数，1秒执行
    var curCount;//当前剩余秒数
    function sendSms(){
        $.ajaxSetup({
            async: false
        });
        var phone = $("#mobile").val();

         //两者格式都争取情况下可发送手机验证码
         curCount = count;
    　　//设置button效果，开始计时
         $("#btnSendCode").attr("disabled", "true");
         $("#btnSendCode").val("请在" + curCount + "秒内输入验证码");
         InterValObj = window.setInterval(SetRemainTime, 1000); //启动计时器，1秒执行一次

         $.ajax({
            type: "get",
            dataType: "json",
            url: "/plus/sendsms.php?phone="+phone,
            success: function(data){
                layer.alert(data.res);
            },
            error: function(){

            },
            cache: false,
            async: false
         });
    }
    //timer处理函数
    function SetRemainTime() {
        if(curCount == 0){
          window.clearInterval(InterValObj);//停止计时器
          $("#btnSendCode").removeAttr("disabled");//启用按钮
          $("#btnSendCode").val("重新发送验证码");
        }else{
           curCount--;
           $("#btnSendCode").val("请在" + curCount + "秒内输入验证码");
        }
    }
    $('#num').css("ime-mode","disabled").bind('keyup change',function(){
  var amount = $('#num').val();
  if(amount.indexOf(".") != "-1"){
    var barr = amount.split(".");
    var xiaoshu = barr[1].length;
    if(xiaoshu>6){
      var org = barr[1].substr(0,xiaoshu-1);
      var xin = parseFloat(barr[0]+"."+org);
      $("#num").val(xin);
    }
  }


});
    $("#bgy_address").change(function () {

        var type = $("#bgy_address option:selected").val();
        if (type == 'tianjia') {
            window.location = '/home.php?lsact=qianbao';
        }
    });
    </script>
<?
}
elseif($_GET['templist']==5){

?>
<?php require("topbut.php") ?>

    <div class="panel panel-inverse">
        <div class="panel-heading">
            <div class="row">
                <div class="col-md-12">
                    <h4 class="panel-title" style="float: left;">资产充值</h4>
                    <a href="home.php?lsact=zhuancoin&templist=2" style="color:#fff;float: right;">充值记录</a>
                </div>
            </div>
        </div>
        <div class="panel-body">
            <form action="control.php" method="post"  class="form-horizontal">
                <fieldset style="border:none;">
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">VIC账户余额</label>
                        <div class="col-md-7 ui-sortable">
                            <input type="text" name="LTC" id="LTC" value="<?php echo $r['cash_purse']?>" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label ui-sortable">VIC充值钱包地址</label>
                        <div class="col-md-7 ui-sortable">
                            <input class="form-control" type="text" id="xfb_address" name="xfb_address" value="<?php echo $r['xfb_address']; ?>"readonly="readonly">
                            <p  style="color: red;">用户申请后，系统会分配唯一且不能修改的接收价值链币的地址</p>
                        </div>
                        <div class="col-md-2 ui-sortable">
                            <?php if(empty($r['xfb_address'])){?>
                                <input type="button" id="bask" value="申请VIC钱包地址" onclick="askfor()" class="btn btn-success">
                            <?}?>
                        </div>

                    </div>
                </fieldset>
            </form>
            <form action="control.php" method="post"  class="form-horizontal">
                <fieldset style="border:none;">
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">LTC账户余额</label>
                        <div class="col-md-7 ui-sortable">
                            <input type="text" name="LTC" id="LTC" value="<?php echo sprintf("%.6f",$r['ltc_account'])?>" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label ui-sortable">LTC充值钱包地址</label>
                        <div class="col-md-7 ui-sortable">
                            <input class="form-control" type="text" id="ltc_address" name="ltc_address" value="<?php echo $r['ltc_address']; ?>" readonly="readonly">
                            <p  style="color: red;">用户申请后，系统会分配唯一且不能修改的接收LTC的地址</p>
                        </div>
                        <div class="col-md-2 ui-sortable" >
                            <?php if(empty($r['ltc_address'])){?>
                                <input type="button" id="ltc_bask" value="申请LTC钱包地址" onclick="askfor_ltc()" class="btn btn-success">
                            <?}?>
                        </div>

                    </div>

                </fieldset>
            </form>
            <form action="control.php" method="post"  class="form-horizontal">
                <fieldset style="border:none;">
                    <div class="form-group">
                        <label for="exampleInputEmail1" class="col-md-3 control-label ui-sortable">BTC账户余额</label>
                        <div class="col-md-7 ui-sortable">
                            <input type="text" name="LTC" id="LTC" value="<?php echo sprintf("%.6f",$r['btc_account'])?>" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label ui-sortable">BTC充值钱包地址</label>
                        <div class="col-md-7 ui-sortable">
                            <input class="form-control" type="text" id="btc_address" name="btc_address" value="<?php echo $r['btc_address']; ?>"readonly="readonly">
                            <p  style="color: red;">用户申请后，系统会分配唯一且不能修改的接收BTC的地址</p>
                        </div>
                        <div class="col-md-2 ui-sortable" >
                            <?php if(empty($r['btc_address'])){?>
                                <input type="button" id="btc_bask" value="申请BTC钱包地址" onclick="askfor_btc()" class="btn btn-success">
                            <?}?>
                        </div>

                    </div>
                </fieldset>
            </form>
            <script type="text/javascript">


                function askfor(){
                   // $('#xfb_address').val('gsaiydfQDBLCVSFpdhpcbagfpgfasb');
                   // $('#bask').hide();
                    $.ajax({
                    type: "post",
                    url: "ajax.php?act=getaddress",
                    dataType: "json",
                    data:{"order_no":''},
                    success: function(data){
                        if (data.status) {
                           $('#xfb_address').val(data.mes);
                           $('#bask').hide();
                        } else {
                            // layer.alert(data.mes);
                        }
                    },
                    error: function(){}
                });
                }
                function askfor_btc(){
                   // $('#xfb_address').val('gsaiydfQDBLCVSFpdhpcbagfpgfasb');
                   // $('#bask').hide();
                    $.ajax({
                    type: "post",
                    url: "ajax.php?act=getaddress_btc",
                    dataType: "json",
                    data:{"order_no":''},
                    success: function(data){
                        if (data.status) {
                           $('#btc_address').val(data.mes);
                           $('#btc_bask').hide();
                        } else {
                            // layer.alert(data.mes);
                        }
                    },
                    error: function(){}
                });
                }
                function askfor_ltc(){
                   // $('#xfb_address').val('gsaiydfQDBLCVSFpdhpcbagfpgfasb');
                   // $('#bask').hide();
                    $.ajax({
                    type: "post",
                    url: "ajax.php?act=getaddress_ltc",
                    dataType: "json",
                    data:{"order_no":''},
                    success: function(data){
                        if (data.status) {
                           $('#ltc_address').val(data.mes);
                           $('#ltc_bask').hide();
                        } else {
                            // layer.alert(data.mes);
                        }
                    },
                    error: function(){}
                });
                }
                </script>
        </div>
    </div>
<?php
}
?>